package com.atxwq.shop.manager.controller;

import com.atxwq.shop.manager.serivce.OrderInfoService;
import com.atxwq.shop.model.dto.order.OrderStatisticsDto;
import com.atxwq.shop.model.entity.order.OrderStatistics;
import com.atxwq.shop.model.vo.common.Result;
import com.atxwq.shop.model.vo.common.ResultCodeEnum;
import com.atxwq.shop.model.vo.order.OrderStatisticsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description 订单统计查询
 * @Date 2025/5/16 13:50
 * @Created by 12336
 */

@RestController
@RequestMapping("/admin/order/orderInfo")
public class OrderInfoController {
    @Autowired
    private OrderInfoService orderInfoService;

    @GetMapping("/getOrderStatistics")
    public Result<OrderStatisticsVo> getOrderStatistics( OrderStatisticsDto orderStatisticsDto) {
        OrderStatisticsVo orderStatisticsVo = orderInfoService.getOrderStatistics(orderStatisticsDto);
        return Result.build(orderStatisticsVo,  ResultCodeEnum.SUCCESS);
    }

    //todo 订单条件查询


}
